import { Spin } from "antd"
import { Suspense } from "react"


const lazyLoad=(Comp:React.LazyExoticComponent<any>):React.ReactNode=>{
    return (
        <Suspense 
        fallback={<Spin size="large" style={{display:'flex', justifyContent:'center', alignItems:'center', height:'100vh'}}></Spin>}
        >

        <Comp></Comp>    
        </Suspense>
    )
}

export default lazyLoad